<template>
    <div @click="routerGo('home')" class="bookcar">
        <div v-if="productList.length>0" class="point">{{productList.length}}</div>
        <img src="../assets/images/an_sd.png" alt="">
    </div>
</template>
<script type="es6">
    import { mapState } from 'vuex'
    export default{
        data(){
            return {
            }
        },
        computed: {
            ...mapState('cart',{
                productList:state=>state.productList
            }),
        },
        methods: {
        },
        mounted: function () {
            this.$nextTick(function () {
               
            })
        }
    }
</script>
<style scoped>
    .bookcar {
        width: 108px;
        height: 109px;
        display: block;
        text-align: center;
        line-height: 40px;
        position: fixed;
        bottom: 140px;
        right: 45px;
        z-index:10;
    }
    .bookcar img{
        width: 100%;
        height: 100%;
    }
    .point{
        position: absolute;
        background: #ff1313;
        color:#fff;
        border-radius: 50%;
        right: 3px;
        top: 3px;
        padding:0 8px;
        font-size: 20px;
    }
</style>